/**
 * @ author: 汪孟苹
 */
define(['jquery','template','bch/app/selfRecord/progestationSelfRecord.servers','bch/template/selfRecord/progestationSelfRecord.tpl'],function($,template,$servers,tpl){
	var ui = {};

	var drawInfo = function(data){
		return template("progestationSelfRecord_info",data);
	}
	var drawMtTable = function(data){
		return template("progestationSelfRecord_mtTable",data);
	}
	var drawBmiTable = function(data){
		return template("progestationSelfRecord_bmiTable",data);
	}

	ui.info = function(options){
		$("#" + options.id).html(tpl.info());
		var h = drawInfo(options.data);
		$("#" + options.id).html(h);
	}
	ui.mtTable = function(options){
		$("#" + options.id).html(tpl.mtTable());
		var h = drawMtTable($servers.handleMtData(options.list));
		$("#" + options.id).html(h);
	}
	ui.bmiTable = function(options){
		$("#" + options.id).html(tpl.bmiTable());
		var h = drawBmiTable($servers.hanleBmiData(options.list));
		$("#" + options.id).html(h);
	}

	return ui;
});